package ynu.lcy.dao;


import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
import ynu.lcy.entity.Business;

import java.util.List;

@Repository
public interface IBusinessDao extends JpaRepository<Business,Long> {
    List<Business> findBusinessesByBusinessNameContaining(String kw);
    List<Business> findBusinessesByBusinessNameContainingAndBusinessAddressContaining(String kw,String kw2);
    List<Business> findAllByOrderByBusinessWeightDesc();
//    @Query("SELECT b FROM Business b WHERE b.businessOrderTypes=:orderType")
//    List<Business> findBusinessByType(@Param("orderType") OrderType orderType);
}
